﻿using WebApplication1.Core.Domain.Entities;

namespace WebApplication1.Core.DataTransferObject {
    public class LouYuanResponse {

        public ushort? LouYuanID { get; set; }

        public string MingCheng { get; set; }

        public int? FangWuShuLiang { get; set; }

        public int? DongShu { get; set; }

        public float? JianZhuMianJi { get; set; }

        public string? JianChengShiJian { get; set; }

        public ushort? SheQuID { get; set; }

        public string? DiZhi { get; set; }

    }

    public static class LouYuanExtension {
        public static LouYuanResponse ToLouYuanResponse(this LouYuan LouYuan) {
            return new LouYuanResponse() {
                LouYuanID = LouYuan.LouYuanID,
                MingCheng = LouYuan.MingCheng,
                FangWuShuLiang = LouYuan.FangWuShuLiang,
                DongShu = LouYuan.DongShu,
                JianZhuMianJi = LouYuan.JianZhuMianJi,
                JianChengShiJian = LouYuan.JianChengShiJian,
                SheQuID = LouYuan.SheQuID,
                DiZhi = LouYuan.DiZhi
            };
        }
    }
}
